<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center my_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub my_fd0_0'>
          <view class='flex flex-wrap align-center my_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='my_fd0_0_c1_c0'>我的</text>
          </view>
          <view class='flex flex-wrap align-center justify-end my_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-direction flex-wrap align-stretch flex-sub my_fd1_0'>
          <view class='flex flex-direction flex-wrap align-stretch justify-between my_fd1_0_c0'>
            <view class='flex align-center justify-end my_fd1_0_c0_c0' v-if="isLogin===true" @tap.stop="handleJumpDiy"
              data-type="navigateTo" :data-url="`/pages/grzx/personalData/personalData`">
              <image class='my_fd1_0_c0_c0_c0' mode="aspectFit" :src='userInfo.avatar'></image>
              <view class='flex flex-direction flex-wrap align-start flex-sub'>
                <view class='flex-sub my_fd1_0_c0_c0_c1_c0'>{{userInfo.nickname}}</view>
                <view class='flex-sub text-xs tabg'>{{userInfo.userlevel_name}}</view>
              </view>
            </view>
            <view class='flex flex-wrap align-center' @tap.stop="toLoginDiy()" v-if="isLogin===false">
              <image class='my_fd1_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"17.png"'></image>
              <view class='flex flex-direction flex-wrap align-center'>
                <text class='flex-sub my_fd1_0_c0_c0_c1_c0'>请登录</text>
              </view>
            </view>
          </view>
        </view>
      </view>


      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout my_flex_2">
        <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd2_0' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/grzx/huishoujil/huishoujil`">
          <view class='flex flex-wrap align-center'>
            <image class='my_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"10.png"'></image>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
            <text class='my_fd2_0_c1_c0'>回收记录</text>
            <image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"18.png"'></image>
          </view>

        </view>
        <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd2_0' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/xtsz/xitongxiaoxi/xitongxiaoxi`">
          <view class='flex flex-wrap align-center'>
            <image class='my_fd2_0_c0_c0' mode="aspectFit" src='/static/tab/tab_diy0.png'></image>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
            <text class='my_fd2_0_c1_c0'>系统消息</text>
            <image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"18.png"'></image>
          </view>
        </view>
        <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd2_1' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/grzx/editRcord/editRcord`">
          <view class='flex flex-wrap align-center'>
            <image class='my_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"52.png"'></image>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
            <text class='my_fd2_0_c1_c0'>库存数据</text>
            <image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"18.png"'></image>
          </view>
        </view>
        <!-- <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd2_1' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/qbgl/myMoney/myMoney`">
          <view class='flex flex-wrap align-center'>
            <image class='my_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"52.png"'></image>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
            <text class='my_fd2_0_c1_c0'>库存数据</text>
            <image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"18.png"'></image>
          </view>
        </view> -->
        <view class='flex flex-wrap align-stretch justify-between flex-sub my_fd2_2' @tap.stop="handleJumpDiy"
          data-type="navigateTo" :data-url="`/pages/xtsz/system/system`">
          <view class='flex flex-wrap align-center'>
            <image class='my_fd2_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"8.png"'></image>
          </view>
          <view class='flex flex-wrap align-center justify-between flex-sub my_fd2_0_c1'>
            <text class='my_fd2_0_c1_c0'>设置</text>
            <image class='my_fd2_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"18.png"'></image>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "userInfo": {
          "invite_code": "",
          "address": "",
          "address_code": "",
          "hobby": "",
          "tags": "",
          "id": "",
          "userlevel_id": "",
          "mobile": "",
          "real_name": "",
          "avatar": "",
          "account": "",
          "email": "",
          "birthday": "",
          "gender": "",
          "create_time": "",
          "user_money": "",
          "freeze_money": "",
          "total_consumption_money": "",
          "score": "",
          "_mobile": "",
          "coupon": "",
          "collection_count": "",
          "browse_count": "",
          "total_money": "",
          "certified": "",
          "nickname": "",
          "is_pay_password": "",
          "follow_count": "",
          "is_close": ""
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      }
    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.queryUserInfoFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //查询用户详细信息
      async queryUserInfoFunc() {
        if (this.isLogin === true) {
          //请求方法
          //数据验证

          let datauserInfo = await this.$api.get(global.apiUrls.post5c78c4772da97, {

          });

          if (datauserInfo.data.code != 1) {
            this.$message.info(datauserInfo.data.msg);
            return
          }
          let infouserInfo = datauserInfo.data;
          this.userInfo = infouserInfo.data

        }
      }
    }
  };
</script>
<style lang="scss" scoped>
  .tabg {
    width: 120rpx;
    height: 36rpx;
    line-height: 36rpx;
    text-align: center;
    background: linear-gradient(99deg, #8DA7D1 0%, #4E628B 100%);
    border-radius: 8rpx;
    color: #FFFFFF;
  }

  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('4.png')) no-repeat;
    background-size: 100% 400rpx;
  }

  .my_flex_0 {
    background: url(image-path('4.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .my_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: var(--benbenFontColor3);
    line-height: 88rpx;
  }

  .my_fd0_0_c0 {
    width: 120rpx;
  }

  .my_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .my_fd1_0_c0_c0_c1_c0 {
    color: var(--benbenFontColor3);
    font-size: 48rpx;
    font-weight: 700;
    margin: 0rpx 0rpx 17rpx 0rpx;
  }

  .my_fd1_0_c0_c0_c0 {
    width: 132rpx;
    height: 132rpx;
    border-radius: 180rpx 180rpx 180rpx 180rpx;
    margin: 0rpx 38rpx 0rpx 0rpx;
  }

  .my_fd1_0_c0_c0 {
    width: 100%;
  }

  .my_fd1_0_c0 {
    padding: 64rpx 27rpx 77rpx 0rpx;
  }

  .my_fd1_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .my_flex_2 {
    padding: 0rpx 24rpx 24rpx 24rpx;
  }

  .my_fd2_2 {
    background: #FFFFFF;
    padding: 0rpx 24rpx 0rpx 29rpx;
    border-radius: 0rpx 0rpx 16rpx 16rpx;
  }

  .my_fd2_1 {
    background: #FFFFFF;
    padding: 0rpx 24rpx 0rpx 29rpx;
  }

  .my_fd2_0_c1_c1 {
    width: 14rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .my_fd2_0_c1_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
  }

  .my_fd2_0_c1 {
    border-bottom: 1px solid #eee;
    margin: 0rpx 0rpx 0rpx 20rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .my_fd2_0_c0_c0 {
    width: 40rpx;
    height: 40rpx;
  }

  .my_fd2_0 {
    background: #FFFFFF;
    padding: 0rpx 24rpx 0rpx 29rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
  }
</style>
